package com.csw.searchRecSys.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.csw.searchRecSys.entity.Category;
import com.csw.searchRecSys.service.CategoryService;
import com.csw.searchRecSys.service.PoemService;

@Controller
@RequestMapping("c")
public class CategoryController {
	@Autowired
	private CategoryService categoryService;
	@Autowired
	PoemService poemService;

	@RequestMapping("qa")
	@ResponseBody
	public List<Category> qa() {
		List<Category> categories = categoryService.qa();
		categories.forEach(dept -> System.out.println("qa/dept/" + dept));
		return categories;
	}
}
